package sg.edu.nus.iss.vmcs.customer;

public class TerminateFaultStrategyFactory {
	public static final int FAULT_TYPE_CHANGE = 1;
	public static final int FAULT_TYPE_STORE_COIN = 2;
	public static final int FAULT_TYPE_DISPENSE = 3;


	  protected TerminateFaultStrategyFactory() {}
	  
	  public static TerminateFaultStrategy create(int faultType) {
		  TerminateFaultStrategy strategy = null;

	    switch (faultType) {
	      case TerminateFaultStrategyFactory.FAULT_TYPE_CHANGE: 
	        strategy = new ChangeGiverFaultStrategy(); break;
	      case TerminateFaultStrategyFactory.FAULT_TYPE_DISPENSE:
	        strategy = new DispenseDrinkFaultStrategy(); break;
	      case TerminateFaultStrategyFactory.FAULT_TYPE_STORE_COIN:
		     strategy = new StoringCoinsFaultStrategy(); break;
	      default: break;
	    }
	    return strategy;
	  }

	
}
